package edu.scut.course_management.dto;

/**
 * 封装前端传到后端的数据对象，用于“返回课程信息列表（管理员）”
 * @author thompson
 */
public class SearchCourseListOfM {
    private String title;
    private Integer courseTypeId;
    private String year;
    private String term;

    

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        if(title != null){
            this.title = "%" + title + "%";//模糊查询
        }
        else
            this.title = null;
    }

    public Integer getCourseTypeId() {
        return courseTypeId;
    }

    public void setCourseTypeId(Integer courseTypeId) {
        this.courseTypeId = courseTypeId;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getTerm() {
        return term;
    }

    public void setTerm(String term) {
        this.term = term;
    }

    @Override
    public String toString() {
        return "SearchCourseListOfM [courseTypeId=" + courseTypeId + ", term=" + term + ", title=" + title + ", year="
                + year + "]";
    }

    public SearchCourseListOfM(String title, Integer courseTypeId, String year, String term) {
        if(title != null){
            this.title = "%" + title + "%";
        }
        else{
            this.title = null;
        }
        this.courseTypeId = courseTypeId;
        this.year = year;
        this.term = term;
    }

    
    
}